package com.xj.ideatest.utils;

import com.alibaba.fastjson.JSONObject;
import com.xj.ideatest.bean.Djt;

public class DjtUtil {
    private DjtUtil() {
    }


    public static Djt getDjt() {
        JSONObject forObject = HttpUtil.getForObject("https://api.nextrt.com/V1/Dutang", JSONObject.class);
        JSONObject data = forObject.getJSONArray("data").getJSONObject(0);
        String djt = data.getString("content");
        Integer id = data.getInteger("id");
        Djt djt1 = new Djt();
        djt1.setId(id);
        djt1.setDjt(djt);
        return djt1;
    }
}
